﻿<%@ Page  Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
CodeBehind="ScheduleFriendly.aspx.cs" Inherits="Nivdal.ScheduleFriendly" Theme="SkinFile" %>


<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_PageNameLabelText %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="FriendlyPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:HiddenField ID="TeamIdHiddenField" runat="server" />
        <asp:HiddenField ID="InvitedTeamIdHiddenField" runat="server" />
        <div class="basic_element">
        <div class="red_title">
           <asp:Label ID="InvitePart1Label" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_InviteLabelPart1 %>" CssClass="white_title"></asp:Label>
            <asp:HyperLink ID="TeamToInviteLink" runat="server" CssClass="white_title"></asp:HyperLink>
            <asp:Label ID="InvitePart2Label" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_InviteLabelPart2 %>" CssClass="white_title"></asp:Label>
        </div>
        <div class="padding5">
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="FriendlyPanel">
        <ProgressTemplate>
            <div class="ajaxloader">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/ajax-loader.gif" />
            </div>
        </ProgressTemplate>
        </asp:UpdateProgress>
        
        <asp:Label ID="ChooseTimeLabel" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_ChooseMatchTime %>" SkinID="GridLabel"></asp:Label>
        <br />
        <table cellpadding="3">
        <tr>
        <td>
            <asp:Label ID="DayTitleLabel" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_Day %>" SkinID="InfoLabel"></asp:Label>
            <br />
            <%--<asp:Calendar ID="Calendar1" runat="server" OnDayRender="DayRender" ></asp:Calendar>--%>
            <asp:DropDownList ID="DateDDL" runat="server" DataSourceID="DatesDataSource" DataTextField="FormattedDate" DataValueField="Date"
             AutoPostBack="true" OnSelectedIndexChanged="DateChanged" >
             <asp:ListItem Selected="True" Value="0" Text="<%$ Resources:Resource, ScheduleFriendly_DateTitle %>"></asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Panel ID="HoursPanel" runat="server" Visible="false">
                <asp:Label ID="HourTitleLabel" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_Hour %>" SkinID="InfoLabel"></asp:Label>
                <br />
                <asp:DropDownList ID="HourDDL" runat="server" DataSourceID="HourDataSource" DataTextField="Formatted" DataValueField="Date"
                    AutoPostBack="true" OnSelectedIndexChanged="HourChanged">
                <asp:ListItem Selected="True" Text="<%$ Resources:Resource, ScheduleFriendly_HourTitle %>" Value="0"></asp:ListItem>
                </asp:DropDownList>
            </asp:Panel>
        </td>
        <td>
            <asp:Panel runat="server" Visible="false" ID="MinutesPanel">
                <asp:Label ID="MinuteTitleLabel" runat="server" Text="<%$ Resources:Resource, ScheduleFriendly_Minute %>" SkinID="InfoLabel"></asp:Label>
                <br />
                <asp:Label ID="Conectionlabel" runat="server" Text=":" SkinID="GridLabel"></asp:Label>            
                <asp:DropDownList ID="MinutesDropDownList" runat="server" DataSourceID="MinutesDataSource" DataTextField="Formatted" DataValueField="Date"
                    AutoPostBack="true" OnSelectedIndexChanged="MinuteChanged" CausesValidation="true">
                    <asp:ListItem Selected="True" Text="<%$ Resources:Resource, ScheduleFriendly_MinuteTitle %>" Value="0"></asp:ListItem>
                </asp:DropDownList>
                
            </asp:Panel>
        </td>
        </tr>
        </table>
        <div style="font-family:Arial; font-size:12px;">
            <asp:RadioButtonList ID="HomeAwayCheckBoxList" runat="server">                
                <asp:ListItem Text="<%$ Resources:Resource, Friendly_HomeMatch %>" Value="1" Selected="True"></asp:ListItem>
                <asp:ListItem Text="<%$ Resources:Resource, Friendly_AwayMatch %>" Value="0"></asp:ListItem>
            </asp:RadioButtonList>
            <br />
            <asp:RadioButtonList ID="CupRulesCheckBoxList" runat="server">
                <asp:ListItem Text="<%$ Resources:Resource, Friendly_NormalRules %>" Value="0" Selected="True"></asp:ListItem>
                <asp:ListItem Text="<%$ Resources:Resource, Friendly_CupRules %>" Value="1"></asp:ListItem>
            </asp:RadioButtonList>
        </div>
        <asp:Panel ID="SendInvitationPanel" runat="server" Visible="false">
            <asp:Label ID="InvitationConfirmTitlelLabel" runat="server" SkinID="GridLabel"></asp:Label>
            <asp:Button ID="SendButton" runat="server" Text="<%$ Resources:Resource, Global_Send %>" CssClass="GreenSmallButtonStyle"
             OnClick="SendInvitation" />
        </asp:Panel>
        <asp:SqlDataSource ID="DatesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_FrienlyGetListOfDatesWhenTeamsCanPlay" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="TeamIdHiddenField" PropertyName="Value" Name="Team1" Type="Decimal"/>
                <asp:ControlParameter ControlID="InvitedTeamIdHiddenField" PropertyName="Value" Name="Team2" Type="Decimal"/>
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="HourDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_FrienlyGetListOfHoursWhenTeamsCanPlay" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="true" >

        </asp:SqlDataSource>
            <asp:SqlDataSource ID="MinutesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_FrienlyGetListOfMinutesWhenTeamsCanPlay" SelectCommandType="StoredProcedure">

        </asp:SqlDataSource>
        </div>
        </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

